package usaco.c2010.march.silver;
import java.util.Scanner;

/*
 * p3602
 * USACO 2010 March - Silver
 */

public class p3602 {

	static int N;
	static char[][] m;
	
	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		N = scanner.nextInt();
		if (N == 1) {
			System.out.println("O");
			System.out.println("X");
			System.out.println("O");
		}
		else {
			m = new char[1<<N + 1][N+1];
			m[1][1] = 'O';
			m[2][1] = 'X';
			for (int i=2;i<=N;++i) {
				int from = (1 << (i-1)) + 1;
				int to = (1 << i);
				for (int j=from;j<=to;++j) {
					for (int k=1;k<=i-1;++k) {
						m[j][k] = m[(1<<i) - j + 1][k];
					}
				}
				for (int j=1;j<=to;++j) {
					if (j<from) {
						m[j][i] = 'O';
					}
					else {
						m[j][i] = 'X';
					}
				}
			}
			
			for (int i=1;i<=(1<<N);++i) {
				for (int j=1;j<=N;++j) {
					System.out.print(m[i][j]);
				}
				System.out.println();
			}
			
			for (int j=1;j<=N;++j) {
				System.out.print(m[1][j]);
			}
			System.out.println();
		}

	}

}
